Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 2023 The Last Good Kid solution in cpp

 


uri 2023 solution in cpp

by ujjal roy




#include<bits/stdc++.h>

using namespace std;

string check(string a)

{

    string s3;

    for(int j=0;j<a.size();j++)

    {

        s3+=toupper(a[j]);

    }

    return s3;

}

main()

{

    int i;

    string s1;

    char c;

    while(cin>>c)

    {

        string s;

       getline(cin,s);

        s=c+s;

        if(check(s)>check(s1)) s1=s;


      

    }

   cout<<s1<<endl;


    return 0;


}


Post a Comment

0 Comments